home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Steal This CD
/
steal_this_cd.iso
/
Chapter 20 - Adware and Spyware
/
enough.exe
/
INSTALL.BAT
< prev
next >
Wrap
DOS Batch File
|
2005-11-17
|
22KB
|
852 lines
@echo off
cls
:: "Enough is Enough": The Internet Explorer Lockdown Utility
::
:: Created by Eric L. Howes
:: eburger68@myrealbox.com
:: http://www.staff.uiuc.edu/~ehowes/
::
:: Copyright (c) 2000-2002 Eric L. Howes
::
:: This program is free software; you can redistribute it and/or modify it under
:: the terms of the GNU General Public License as published by the Free Software
:: Foundation; either version 2, or (at your option) any later version.
::
:: This program is distributed in the hope that it will be useful, but WITHOUT ANY
:: WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
:: A PARTICULAR PURPOSE. See the GNU General Public License for more details.
::
:: Some files distributed with this package may not be covered by the GNU GPL. Those
:: files remain the property of their original owners and are covered by the licenses
:: under which they were originally distributed.
::
:: All trademarks are the property of their respective owners.
::
:: You should have received a copy of the GNU General Public License along with this
:: program; see the file COPYING. If not, write to the Free Software Foundation,
:: 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
::********************************************************************
::CHOICE Installation
::********************************************************************
:: Check for NT or 9x
if exist %WINDIR%\SYSTEM32\CONFIG goto prep-nt
:: ---------------
:: Copy choice.com
:: ---------------
:prep-9x
if exist %WINDIR%\command\choice.com goto CHK-IE6
if exist %WINDIR%\choice.com goto CHK-IE6
copy choice\choice.com %WINDIR%
goto CHK-IE6
:: ---------------
:: Copy choice.exe
:: ---------------
:prep-nt
if exist %WINDIR%\command\choice.exe goto CHK-IE6
if exist %WINDIR%\choice.exe goto CHK-IE6
copy choice\choice.exe %WINDIR%
goto CHK-IE6
::********************************************************************
:CHK-IE6
::********************************************************************
:: -------------
:: Check FOR IE6
:: -------------
:: Delete previous check.reg
if exist check.reg del check.reg>nul
:: Check for IE6 - this file will be used during installation
start /w regedit /e check.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\P3P"
::********************************************************************
:1ST-BCK
::********************************************************************
:: ----------------
:: Check for Backup
:: ----------------
if exist backup\back-1.reg goto MENU
:: ------------------
:: Backup IE Settings
:: ------------------
:PRE-INST
:: Backup...
md backup
start /w regedit /e backup\back-1.reg "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main"
start /w regedit /e backup\back-2.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
:: Note: the following keys are related to AutoComplete and Profile Assistant. They
:: are commented out here and everywhere else in this batch file.
:: start /w regedit /e backup\back-3.reg HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete
:: start /w regedit /e backup\back-4.reg "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Security"
:: start /w regedit /e backup\back-5.reg "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\IntelliForms"
if exist backup\back-1.reg goto BCK-NOT
goto ERROR
:: -------------
:: Backup Notice
:: -------------
:BCK-NOT
echo.
echo ---------------------------------------
echo Welcome to Enough is Enough!:
echo.
echo The Internet Explorer Lockdown Utility!
echo ---------------------------------------
echo.
echo Your current Internet Explorer settings been backed up.
if exist check.reg echo.
if exist check.reg echo Note: It looks like you're using Internet Explorer 6.0.
echo If you're not running IE 6.0, exit from the main
echo menu (which is next) and check the Compatibility
echo section of the ReadMe.txt for advice on getting
echo Enough is Enough! to recognize your version of
echo Internet Explorer properly.
echo.
pause
goto MENU
::********************************************************************
:MENU
::********************************************************************
cls
:: -------------------------------
:: Give the main menu with choices
:: -------------------------------
echo.
echo Welcome to
echo ---------------------------------------
echo Enough is Enough!
echo.
echo The Internet Explorer Lockdown Utility!
echo ---------------------------------------
echo.
echo.
echo ** Main Menu **
echo.
echo.
echo [1] INSTALL (complete)
echo.
echo [2] UNINSTALL (complete or partial)
echo.
echo [3] Exit
echo.
:: ----------
:: Get choice
:: ----------
echo What do you want to do?
choice /c:1234 /n /t:4,90
if errorlevel 4 goto MENU
if errorlevel 3 goto FIN
if errorlevel 2 goto UNINST
if errorlevel 1 goto INSTALL
goto MENU
::********************************************************************
:INSTALL
::********************************************************************
cls
:: ---------------
:: Confirm Install
:: ---------------
echo.
echo ** CONFIRM INSTALL **
echo.
echo.
echo This will install Enough is Enough!
echo.
echo * Internet and Restricted sites zones will be locked down.
echo * Cookies will be severely restricted (but not disabled).
echo * Install on Demand and Third-party Browser Extensions
echo will be disabled.
echo * IE PowerTweaks WebZone will be installed.
echo.
echo If you don't understand the changes that Enough is Enough! will
echo make to Internet Explorer, please consult the ReadMe.txt for
echo details and explanations.
echo.
echo Are you sure that you want to install Enough is Enough?
echo.
echo [1] YES - I've had enough! Install it!
echo [2] NO - I'm not sure, return to main menu...
choice /c:123 /n /t:3,90
if errorlevel 3 goto INSTALL
if errorlevel 2 goto MENU
if errorlevel 1 goto GO-INST
goto INSTALL
::------
:GO-INST
::------
cls
:: ------------------------------------------------------------
:: Check if we have IE6, and jump to the appropriate label.
:: ------------------------------------------------------------
:: Check if we have IE6
if exist check.reg goto IE6-INST
::-------
:IE5-INST
::-------
:: file check
:: if not exist set\autoprof.reg goto IN-FILE
if not exist set\advanced.reg goto IN-FILE
if not exist set\htaoff.reg goto IN-FILE
if not exist set\ie5-cook.reg goto IN-FILE
if not exist set\iz-set.reg goto IN-FILE
:: if not exist set\mz-set.reg goto IN-FILE
if not exist set\rz-set.reg goto IN-FILE
if not exist webzone\webzone.inf goto IN-FILE
if not exist webzone\webzone.dll goto IN-FILE
:: install .REG files
:: start /w regedit.exe /s set\autoprof.reg
start /w regedit.exe /s set\advanced.reg
start /w regedit.exe /s set\htaoff.reg
start /w regedit.exe /s set\ie5-cook.reg
start /w regedit.exe /s set\iz-set.reg
:: start /w regedit.exe /s set\mz-set.reg
start /w regedit.exe /s set\rz-set.reg
:: check for previous install of WebZone
if exist %WINDIR%\SYSTEM\webzone.dll goto SUCCESS
if exist %WINDIR%\SYSTEM32\webzone.dll goto SUCCESS
:: install WebZone
start /w RunDll32 advpack.dll,LaunchINFSection webzone\webzone.inf, DefaultInstall
:: confirm installation
if exist %WINDIR%\SYSTEM\webzone.dll goto SUCCESS
if exist %WINDIR%\SYSTEM32\webzone.dll goto SUCCESS
goto ERROR
::-------
:IE6-INST
::-------
:: file check
:: if not exist set\autoprof.reg goto IN-FILE
if not exist set\advanced.reg goto IN-FILE
if not exist set\htaoff.reg goto IN-FILE
if not exist set\ie6-cook.reg goto IN-FILE
if not exist set\iz-set.reg goto IN-FILE
:: if not exist set\mz-set.reg goto IN-FILE
if not exist set\rz-set.reg goto IN-FILE
if not exist set\ie6-set.reg goto IN-FILE
if not exist webzone\webzone.inf goto IN-FILE
if not exist webzone\webzone.dll goto IN-FILE
:: install .REG files
:: start /w regedit.exe /s set\autoprof.reg
start /w regedit.exe /s set\advanced.reg
start /w regedit.exe /s set\htaoff.reg
start /w regedit.exe /s set\ie6-cook.reg
start /w regedit.exe /s set\iz-set.reg
:: start /w regedit.exe /s set\mz-set.reg
start /w regedit.exe /s set\rz-set.reg
start /w regedit.exe /s set\ie6-set.reg
:: check for previous install of WebZone
if exist %WINDIR%\SYSTEM\webzone.dll goto SUCCESS
if exist %WINDIR%\SYSTEM32\webzone.dll goto SUCCESS
:: install WebZone
start /w RunDll32 advpack.dll,LaunchINFSection webzone\webzone.inf, DefaultInstall
:: confirm installation
if exist %WINDIR%\SYSTEM\webzone.dll goto SUCCESS
if exist %WINDIR%\SYSTEM32\webzone.dll goto SUCCESS
goto ERROR
:: --------------
:: No Proper File
:: --------------
:IN-FILE
echo.
echo.
echo ...but one of the files needed for installation could
echo not be found. Consequently, Enough is Enough! has NOT
echo been installed.
echo.
echo Please correct this problem and try again.
echo.
pause (Press Any Key to Return to Main Menu)
goto MENU
::********************************************************************
:UNINST
::********************************************************************
cls
::-------
:UN-MENU
::-------
echo.
echo.
echo ** Uninstall Menu **
echo.
echo.
echo [1] Uninstall All
echo.
echo [2] Uninstall, but leave WebZone
echo.
echo [3] Uninstall WebZone only
echo.
echo [4] Restore Default IE6 Cookie Settings only
echo.
echo [5] Return to Main Menu
echo.
:: ----------
:: Get choice
:: ----------
echo What do you want to uninstall or restore?
choice /c:123456 /n /t:6,90
if errorlevel 6 goto UNINST
if errorlevel 5 goto MENU
if errorlevel 4 goto UN-IE6
if errorlevel 3 goto UN-WZ
if errorlevel 2 goto UN-PART
if errorlevel 1 goto UN-ALL
goto UN-MENU
::-------
:UN-ALL
::-------
cls
:: -----------------
:: Confirm Uninstall
:: -----------------
echo.
echo ** CONFIRM COMPLETE UNINSTALL **
echo.
echo.
echo This will completely uninstall Enough is Enough!
echo.
echo * Your Internet Explorer settings will be restored
echo to the state before you installed.
echo * WebZone will be uninstalled.
echo.
echo Are you sure that you want to completely uninstall Enough is Enough?
echo.
echo [1] YES - uninstall it.
echo [2] NO - return to main menu.
choice /c:123 /n /t:3,90
if errorlevel 3 goto UN-ALL
if errorlevel 2 goto MENU
if errorlevel 1 goto RMV-ALL
goto UN-ALL
::------
:RMV-ALL
::------
:: file check
if not exist backup\back-1.reg goto NO-FILE
if not exist backup\back-2.reg goto NO-FILE
:: if not exist backup\back-3.reg goto NO-FILE
:: if not exist backup\back-4.reg goto NO-FILE
if not exist set\htaon-9x.reg goto NO-FILE
if not exist set\htaon-nt.reg goto NO-FILE
:: uninstall .REG files
start /w regedit.exe /s backup\back-1.reg
start /w regedit.exe /s backup\back-2.reg
:: start /w regedit.exe /s backup\back-3.reg
:: start /w regedit.exe /s backup\back-4.reg
if exist %windir%\system32\mshta.exe goto HTA-UN-NT
start /w regedit.exe /s set\htaon-9x.reg
goto CONT-UN
:HTA-UN-NT
start /w regedit.exe /s set\htaon-nt.reg
:: if not exist backup\back-5.reg goto CONT-UN
:: start /w regedit.exe /s backup\back-5.reg
:CONT-UN
:: check for install of Power Tweaks Web Accessories
start /w regedit /e ie5wa.reg HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\IE5WA
if exist ie5wa.reg goto SUCC-2
:: check for previous uninstall of WebZone
if not exist %WINDIR%\INF\webzone.inf goto SUCC-1
:: uninstall WebZone
start /w RunDll32 advpack.dll,LaunchINFSection %WINDIR%\inf\webzone.inf, Uninstall
:: confirm uninstallation
if exist %WINDIR%\SYSTEM\webzone.dll goto ERROR
if exist %WINDIR%\SYSTEM32\webzone.dll goto ERROR
goto SUCC-1
::-------
:UN-PART
::-------
cls
:: -----------------
:: Confirm Uninstall
:: -----------------
echo.
echo ** CONFIRM PARTIAL UNINSTALL **
echo.
echo.
echo This will uninstall Enough is Enough! but leave WebZone.
echo.
echo * Your Internet Explorer settings will be restored
echo to the state before you installed.
echo * WebZone will NOT be uninstalled.
echo.
echo Are you sure that you want to uninstall Enough is Enough?
echo.
echo [1] YES - uninstall it.
echo [2] NO - return to main menu.
choice /c:123 /n /t:3,90
if errorlevel 3 goto UN-PART
if errorlevel 2 goto MENU
if errorlevel 1 goto RMV-PART
goto UN-PART
::-------
:RMV-PART
::-------
:: file check
if not exist backup\back-1.reg goto NO-FILE
if not exist backup\back-2.reg goto NO-FILE
:: if not exist backup\back-3.reg goto NO-FILE
:: if not exist backup\back-4.reg goto NO-FILE
if not exist set\htaon-9x.reg goto NO-FILE
if not exist set\htaon-nt.reg goto NO-FILE
:: uninstall .REG files
start /w regedit.exe /s backup\back-1.reg
start /w regedit.exe /s backup\back-2.reg
:: start /w regedit.exe /s backup\back-3.reg
:: start /w regedit.exe /s backup\back-4.reg
if exist %windir%\system32\mshta.exe goto HTA-UN-2K
start /w regedit.exe /s set\htaon-9x.reg
goto CONT-PT
:HTA-UN-2K
start /w regedit.exe /s set\htaon-nt.reg
:: if not exist backup\back-5.reg goto SUCC-3
:: start /w regedit.exe /s backup\back-5.reg
:CONT-PT
goto SUCC-3
::-------
:UN-WZ
::-------
cls
:: -----------------
:: Confirm Uninstall
:: -----------------
echo.
echo ** CONFIRM WEBZONE UNINSTALL **
echo.
echo.
echo This will uninstall WebZone but leave your current Internet
echo Explorer settings.
echo.
echo Are you sure that you want to uninstall WebZone?
echo.
echo [1] YES - uninstall it.
echo [2] NO - return to main menu.
choice /c:123 /n /t:3,90
if errorlevel 3 goto UN-WZ
if errorlevel 2 goto MENU
if errorlevel 1 goto RMV-WZ
goto UN-WZ
::-----
:RMV-WZ
::-----
:: check for install of PowerTweaks WebAccessories
start /w regedit /e ie5wa.reg HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\IE5WA
if exist ie5wa.reg goto IE5WA
:: check for previous uninstall of WebZone
if not exist %WINDIR%\INF\webzone.inf goto SUCC-4
:: uninstall WebZone
start /w RunDll32 advpack.dll,LaunchINFSection %WINDIR%\inf\webzone.inf, Uninstall
:: confirm uninstallation
if exist %WINDIR%\SYSTEM\webzone.dll goto ERROR
if exist %WINDIR%\SYSTEM32\webzone.dll goto ERROR
goto SUCC-4
::-------
:UN-IE6
::-------
cls
:: -----------------
:: Confirm Uninstall
:: -----------------
echo.
echo ** CONFIRM RESTORE IE 6.0 COOKIES SETTINGS **
echo.
echo.
echo This will restore *default* Internet Explorer 6.0 cookie settings, not
echo your own *original* cookie settings. All other settings will be unchanged.
echo.
echo * Default IE 6.0 settings will be restored.
echo * All other security settings will be left alone.
echo * WebZone will NOT be uninstalled.
echo.
echo Are you sure that you want to restore *default* Internet Explorer 6.0
echo cookie settings?
echo.
echo [1] YES - restore the default cookie settings.
echo [2] NO - return to main menu.
choice /c:123 /n /t:3,90
if errorlevel 3 goto UN-IE6
if errorlevel 2 goto MENU
if errorlevel 1 goto RMV-IE6
goto UN-IE6
::------
:RMV-IE6
::------
:: file check and IE6 check
if not exist set\ie6-def.reg goto NO-FILE
if not exist check.reg goto NO-IE6
:: restore IE6 settings with .REG file
start /w regedit.exe /s set\ie6-def.reg
goto SUCC-5
:: --------------
:: No Proper File
:: --------------
:NO-FILE
echo.
echo.
echo ...but one of the files needed for uninstallation could
echo not be found. Consequently, Enough is Enough! has NOT
echo been uninstalled.
echo.
echo Please correct this problem and try again.
echo.
pause (Press Any Key to Return to Main Menu)
goto MENU
::********************************************************************
:NO-IE6
::********************************************************************
cls
echo.
echo.
echo Sorry, but Internet Explorer 6.0 is not installed
echo on this computer.
echo.
echo.
pause
goto RETURN
::********************************************************************
:ERROR
::********************************************************************
cls
echo.
echo.
echo An error ocurred while performing this task...
echo.
echo.
pause
goto RETURN
::********************************************************************
:SUCCESS
::********************************************************************
cls
echo.
echo.
echo SUCCESS!!
echo.
echo Enough is Enough! has been installed on this computer.
echo.
echo Note: If the IE Toolbar zone buttons do not appear on
echo your IE toolbar, then the full IE Power Tweaks
echo Web Accessories package from Microsoft was already
echo installed on your PC. To install just the Toolbar
echo zone buttons, you can run INST-BUT.BAT.
goto RETURN
::********************************************************************
:SUCC-1
::********************************************************************
cls
echo.
echo.
echo SUCCESS!!
echo.
echo Enough is Enough! has been removed from this computer.
echo.
goto RETURN
::********************************************************************
:SUCC-2
::********************************************************************
cls
echo.
echo.
echo SUCCESS!!
echo.
echo Enough is Enough! has been removed from this computer.
echo.
echo Note: WebZone was NOT removed because IE5 Power Tweaks
echo Web Accessories is installed on this computer. If you
echo wish to uninstall WebZone, uninstall the IE5 Power Tweaks
echo Web Accessories through Add-Remove Programs in the
echo Control Panel.
echo.
del ie5wa.reg>nul
goto RETURN
::********************************************************************
:SUCC-3
::********************************************************************
cls
echo.
echo.
echo SUCCESS!!
echo.
echo Enough is Enough! has been removed from this computer.
echo The WebZone Accessory was left.
echo.
goto RETURN
::********************************************************************
:SUCC-4
::********************************************************************
cls
echo.
echo.
echo SUCCESS!!
echo.
echo The WebZone Accessory has been removed from this computer. The
echo Enough is Enough! Privacy and Security configuration changes
echo to Internet Explorer have been left in place.
echo.
goto RETURN
::********************************************************************
:SUCC-5
::********************************************************************
cls
echo.
echo.
echo SUCCESS!!
echo.
echo Default Internet Explorer 6.0 cookies settings have been
echo restored on this computer. No other changes were made.
echo.
goto RETURN
::********************************************************************
:IE5WA
::********************************************************************
cls
echo.
echo.
echo WebZone was NOT removed because IE5 Power Tweaks Web
echo Accessories is installed on this computer. If you
echo wish to uninstall WebZone, uninstall the IE5 Power
echo Tweaks Web Accessories through Add-Remove Programs
echo in the Control Panel.
echo.
del ie5wa.reg>nul
goto RETURN
::********************************************************************
:RETURN
::********************************************************************
:: -----------------
:: Give Choice Again
:: -----------------
echo.
echo What do you want to do now?
echo.
echo [1] Return to Main Menu
echo [2] Exit
echo.
choice /c:123 /n /t:3,90
if errorlevel 3 goto menu
if errorlevel 2 goto fin
if errorlevel 1 goto menu
::********************************************************************
:FIN
::********************************************************************
:: Delete previous check.reg
if exist check.reg del check.reg>nul
cls
echo.
echo.
echo So, you've had enough of Enough is Enough?
echo.
echo.
echo Bye for now...
echo.
echo.